program Task5;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  arrInt = array of Integer;

var
  n, i, j: Integer;
  mass: array of arrInt;

begin
  Readln(n);
  SetLength (mass, n);
  for i:=0 to n-1 do
  begin
    SetLength (mass[i], n);
  end;
  for i:=0 to n-1 do
  begin
    for j:=0 to n-1 do
    begin
      mass[i][j]:=0;
    end;
  end;
  for i:=0 to n-1 do
  begin
      mass[i][0]:=1;
  end;
  for i:=1 to n-1 do
  begin
    for j:=1 to n-1 do
    begin
      mass[i][j]:=mass[i-1][j-1]+mass[i-1][j];
    end;
  end;

  for i:=0 to n-1 do
  begin
    for j:=0 to n-1 do
    begin
      write (mass[i][j]);
      write(' ');
    end;
    Writeln;
  end;
  Readln;
end.
